#include <iostream>
#include "SM3.h"

int main() {
    std::string input;
    std::getline(std::cin,input);//从输入读入一行字符(任意长度)
    Word* hash = SM3::hash((Byte *)input.c_str(), input.length());//hash
    for (int i = 0; i < 8; i++) {
        printf("%x ", hash[i]);
    }
    putchar('\n');
    return 0;
}